#pragma once

#include <math.h>
#include "Vector2.h"
#include "vector3.h"

namespace BAA
{
	class MathHelper
	{
	public: 
		static inline float clamp(const Vector2 * range, float value)
		{
			
			if(range->x > value)
				return range->x;
			else if(range->y < value)
				return range->y;
			else
				return value;

		}


		static inline float distance(const Vector3 * a, const Vector3 * b)
		{

			return sqrt(pow((b->x - a->x),2) + pow((b->y - a->y),2) + pow((b->z - a->z),2));

		}

		static inline float distance(float a, float b)
		{
			return abs(b-a);
		}
	};
}


